home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
icon
/
packages.lha
/
packages
/
atari
/
ats.arc
/
STAND.ARC
/
FNCS.OUT
< prev
next >
Wrap
Text File
|
1990-03-28
|
8KB
|
503 lines
----> &null
copy(1) ----> 1
copy("abc") ----> "abc"
copy('aabbcc') ----> 'abc'
copy(main) ----> procedure main
copy([1,2,3]) ----> list_3(3)
copy(table(0)) ----> table_2(0)
copy() ----> &null
copy(&input) ----> &input
w := copy(write) ----> function write
function write
w(image(w)) ----> "function write"
copy(array()) ----> record array_2(7)
copy := copy(copy) ----> function copy
x := copy(array) ----> record constructor array
x := x(1,2,3,4,5,6,7) ----> record array_3(7)
x[-4] ----> 4
v := copy(c) ----> &null
x := repl("123",4) ----> "123123123123"
co-expression_1(1)
p2 local identifiers:
x = "123123123123"
v = &null
c = &null
i = &null
main local identifiers:
global identifiers:
main = procedure main
array = record constructor array
p1 = procedure p1
p2 = procedure p2
p3 = procedure p3
p4 = procedure p4
p5 = procedure p5
p6 = procedure p6
p7 = procedure p7
p8 = procedure p8
p9 = procedure p9
p10 = procedure p10
p11 = procedure p11
p12 = procedure p12
p13 = procedure p13
p14 = procedure p14
w = function write
t = &null
write = function write
image = function image
copy = function copy
table = function table
repl = function repl
display = function display
sort = function sort
center = function center
left = function left
right = function right
trim = function trim
list = function list
set = function set
string = function string
type = function type
cset = function cset
seq = function seq
display(,&output) ----> &null
t := table() ----> table_3(0)
every i := 1 to 100 do t[i] := i ----> none
x := sort(t) ----> list_4(100)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
every write((!x)[2]) ----> none
d
d
d
cd
cd
cd
cde
cde
cde
bcde
bcde
bcde
bcdef
bcdef
bcdef
abcdef
abcdef
abcdef
abcdef
abcdef0
abcdef-
abcdef
0abcdef0
=abcdef-
abcdef
0abcdef00
=abcdef=-
abcdef
00abcdef00
=-abcdef=-
abcdef
00abcdef000
=-abcdef-=-
abcdef
000abcdef000
=-=abcdef-=-
abcdef
000abcdef0000
=-=abcdef=-=-
abcdef
0000abcdef0000
=-=-abcdef=-=-
abcdef
0000abcdef00000
=-=-abcdef-=-=-
abcdef
00000abcdef00000
=-=-=abcdef-=-=-
abcdef
00000abcdef000000
=-=-=abcdef=-=-=-
abcdef
000000abcdef000000
=-=-=-abcdef=-=-=-
abcdef
000000abcdef0000000
=-=-=-abcdef-=-=-=-
abcdef
0000000abcdef0000000
=-=-=-=abcdef-=-=-=-
every write(center("abcdef",1 to 20," " | "0" | "=-")) ----> none
a
a
a
ab
ab
ab
abc
abc
abc
abcd
abcd
abcd
abcde
abcde
abcde
abcdef
abcdef
abcdef
abcdef
abcdef0
abcdef-
abcdef
abcdef00
abcdef=-
abcdef
abcdef000
abcdef-=-
abcdef
abcdef0000
abcdef=-=-
abcdef
abcdef00000
abcdef-=-=-
abcdef
abcdef000000
abcdef=-=-=-
abcdef
abcdef0000000
abcdef-=-=-=-
abcdef
abcdef00000000
abcdef=-=-=-=-
abcdef
abcdef000000000
abcdef-=-=-=-=-
abcdef
abcdef0000000000
abcdef=-=-=-=-=-
abcdef
abcdef00000000000
abcdef-=-=-=-=-=-
abcdef
abcdef000000000000
abcdef=-=-=-=-=-=-
abcdef
abcdef0000000000000
abcdef-=-=-=-=-=-=-
abcdef
abcdef00000000000000
abcdef=-=-=-=-=-=-=-
every write(left("abcdef",1 to 20," " | "0" | "=-")) ----> none
f
f
f
ef
ef
ef
def
def
def
cdef
cdef
cdef
bcdef
bcdef
bcdef
abcdef
abcdef
abcdef
abcdef
0abcdef
=abcdef
abcdef
00abcdef
=-abcdef
abcdef
000abcdef
=-=abcdef
abcdef
0000abcdef
=-=-abcdef
abcdef
00000abcdef
=-=-=abcdef
abcdef
000000abcdef
=-=-=-abcdef
abcdef
0000000abcdef
=-=-=-=abcdef
abcdef
00000000abcdef
=-=-=-=-abcdef
abcdef
000000000abcdef
=-=-=-=-=abcdef
abcdef
0000000000abcdef
=-=-=-=-=-abcdef
abcdef
00000000000abcdef
=-=-=-=-=-=abcdef
abcdef
000000000000abcdef
=-=-=-=-=-=-abcdef
abcdef
0000000000000abcdef
=-=-=-=-=-=-=abcdef
abcdef
00000000000000abcdef
=-=-=-=-=-=-=-abcdef
every write(right("abcdef",1 to 20," " | "0" | "=-")) ----> none
center("",20,repl("x.",30)) ----> "x.x.x.x.x.x.x.x.x.x."
left("",20,repl("x.",30)) ----> "x.x.x.x.x.x.x.x.x.x."
right("",20,repl("x.",30)) ----> "x.x.x.x.x.x.x.x.x.x."
a
aa
aaa
aaaa
aaaaa
ab
abab
ababab
abababab
ababababab
ba
baba
bababa
babababa
bababababa
every write(repl("a" | "ab" | "ba",1 to 5)) ----> none
repl("",0) ----> ""
repl(&cset,0) ----> ""
trim(&lcase) ----> "abcdefghijklmnopqrstuvwxyz"
trim(&lcase,&lcase) ----> ""
image(2) ----> "2"
image('cab') ----> "'abc'"
image(&lcase) ----> "&lcase"
image('abcdefghijklmnopqrstuvwxyz') ----> "'abcdefghijklmnopqrstuvwxyz'"
image(&input) ----> "&input"
image() ----> "&null"
image(&null) ----> "&null"
image([1,2,3]) ----> "list_105(3)"
image([]) ----> "list_106(0)"
image([,]) ----> "list_107(2)"
image(table()) ----> "table_4(0)"
image(table(3)) ----> "table_5(0)"
image(list(0)) ----> "list_108(0)"
image(set()) ----> "set_1(0)"
image(set([1,2,3,3,3,3,3,4])) ----> "set_2(4)"
image(repl) ----> "function repl"
image(main) ----> "procedure main"
image(repl(&lcase,10)) ----> "\"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\""
image(array) ----> "record constructor array"
image(a) ----> "&null"
image(array) ----> "record constructor array"
image(image) ----> "function image"
string(2) ----> "2"
string("2") ----> "2"
string(" 2") ----> " 2"
string("2 ") ----> "2 "
string("+2") ----> "+2"
string("-2") ----> "-2"
string("- 2") ----> "- 2"
string(" - 2 ") ----> " - 2 "
string("") ----> ""
string("--2") ----> "--2"
string(" ") ----> " "
string("-") ----> "-"
string("+") ----> "+"
string("22222222222222222222222222222222222222222222222222222222222") ----> "22222222222222222222222222222222222222222222222222222222222"
string("7r4") ----> "7r4"
string("4r7") ----> "4r7"
string("4r 7") ----> "4r 7"
string("7r 4") ----> "7r 4"
string("16rff") ----> "16rff"
string("36rcat") ----> "36rcat"
string("36Rcat") ----> "36Rcat"
string("36rCAT") ----> "36rCAT"
string("1r1") ----> "1r1"
string("2r0") ----> "2r0"
type(0) ----> "integer"
type("abc") ----> "string"
type('aba') ----> "cset"
type() ----> "null"
type(&null) ----> "null"
type(&errout) ----> "file"
type([]) ----> "list"
type(table()) ----> "table"
type(main) ----> "procedure"
type(write) ----> "procedure"
type(array()) ----> "array"
type(array) ----> "procedure"
type(f) ----> "null"
cset(2) ----> '2'
cset("2") ----> '2'
cset(" 2") ----> ' 2'
cset("2 ") ----> ' 2'
cset("+2") ----> '+2'
cset("-2") ----> '-2'
cset("- 2") ----> ' -2'
cset(" - 2 ") ----> ' -2'
cset("") ----> ''
cset("--2") ----> '-2'
cset(" ") ----> ' '
cset("-") ----> '-'
cset("+") ----> '+'
cset("22222222222222222222222222222222222222222222222222222222222") ----> '2'
cset("7r4") ----> '47r'
cset("4r7") ----> '47r'
cset("4r 7") ----> ' 47r'
cset("7r 4") ----> ' 47r'
cset("16rff") ----> '16fr'
cset("36rcat") ----> '36acrt'
cset("36Rcat") ----> '36Ract'
cset("36rCAT") ----> '36ACTr'
cset("1r1") ----> '1r'
cset("2r0") ----> '02r'
1
2
3
4
5
6
7
8
9
10
every write(seq()) \ 10 ----> none
2
3
4
5
6
7
8
9
10
11
every write(seq(2)) \ 10 ----> none
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1
every write(seq(-10)) \ 10 ----> none
1
4
7
10
13
16
19
22
25
28
every write(seq(,3)) \ 10 ----> none